home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
- Object = "{BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0"; "TABCTL32.OCX"
- Begin VB.Form frmOptions
- BorderStyle = 3 'Fixed Dialog
- Caption = "Setup TestNCTWavPlayer "
- ClientHeight = 3540
- ClientLeft = 2565
- ClientTop = 1500
- ClientWidth = 5985
- Icon = "frmOptions.frx":0000
- KeyPreview = -1 'True
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 3540
- ScaleWidth = 5985
- ShowInTaskbar = 0 'False
- StartUpPosition = 2 'CenterScreen
- Begin MSComDlg.CommonDialog CommonDialog1
- Left = 450
- Top = 2925
- _ExtentX = 847
- _ExtentY = 847
- _Version = 393216
- End
- Begin TabDlg.SSTab SSTab1
- Height = 2745
- Left = 60
- TabIndex = 9
- Top = 120
- Width = 5850
- _ExtentX = 10319
- _ExtentY = 4842
- _Version = 393216
- Style = 1
- Tabs = 4
- TabsPerRow = 4
- TabHeight = 520
- TabCaption(0) = "I/O Device"
- TabPicture(0) = "frmOptions.frx":000C
- Tab(0).ControlEnabled= -1 'True
- Tab(0).Control(0)= "Frame1"
- Tab(0).Control(0).Enabled= 0 'False
- Tab(0).Control(1)= "Frame2"
- Tab(0).Control(1).Enabled= 0 'False
- Tab(0).ControlCount= 2
- TabCaption(1) = "Scale "
- TabPicture(1) = "frmOptions.frx":0028
- Tab(1).ControlEnabled= 0 'False
- Tab(1).Control(0)= "Frame4"
- Tab(1).Control(1)= "Frame5"
- Tab(1).ControlCount= 2
- TabCaption(2) = "Color"
- TabPicture(2) = "frmOptions.frx":0044
- Tab(2).ControlEnabled= 0 'False
- Tab(2).Control(0)= "List1"
- Tab(2).Control(1)= "cmdColorChoice"
- Tab(2).Control(2)= "Color"
- Tab(2).ControlCount= 3
- TabCaption(3) = "Other"
- TabPicture(3) = "frmOptions.frx":0060
- Tab(3).ControlEnabled= 0 'False
- Tab(3).Control(0)= "Text2"
- Tab(3).Control(1)= "Text1"
- Tab(3).Control(2)= "Label4"
- Tab(3).Control(3)= "Label3"
- Tab(3).ControlCount= 4
- Begin VB.TextBox Text2
- Height = 285
- Left = -73050
- Locked = -1 'True
- TabIndex = 34
- Text = "Text2"
- Top = 1140
- Width = 3165
- End
- Begin VB.TextBox Text1
- Height = 300
- Left = -73050
- TabIndex = 33
- Text = "Text1"
- Top = 675
- Width = 3165
- End
- Begin VB.PictureBox Color
- Height = 1410
- Left = -72375
- ScaleHeight = 1350
- ScaleWidth = 2820
- TabIndex = 30
- Top = 450
- Width = 2880
- End
- Begin VB.CommandButton cmdColorChoice
- Caption = "Change Color"
- Height = 390
- Left = -72360
- TabIndex = 29
- Top = 2040
- Width = 2835
- End
- Begin VB.ListBox List1
- Height = 2010
- ItemData = "frmOptions.frx":007C
- Left = -74850
- List = "frmOptions.frx":00A3
- TabIndex = 28
- Top = 420
- Width = 2295
- End
- Begin VB.Frame Frame2
- Caption = "Playback device"
- Height = 960
- Left = 180
- TabIndex = 21
- Top = 1560
- Width = 5520
- Begin VB.CheckBox Check6
- Caption = "Selected during playing"
- Height = 240
- Left = 3420
- TabIndex = 26
- Top = 420
- Width = 1965
- End
- Begin VB.ComboBox Combo2
- Height = 315
- Left = 825
- Style = 2 'Dropdown List
- TabIndex = 24
- Top = 360
- Width = 2325
- End
- Begin VB.Label Label1
- Caption = "Name:"
- Height = 315
- Left = 180
- TabIndex = 25
- Top = 420
- Width = 795
- End
- End
- Begin VB.Frame Frame1
- Caption = "Record device"
- Height = 960
- Left = 180
- TabIndex = 20
- Top = 480
- Width = 5520
- Begin VB.CheckBox Check7
- Caption = "Event of the end recordblock"
- Height = 540
- Left = 3420
- TabIndex = 27
- Top = 225
- Width = 1845
- End
- Begin VB.ComboBox Combo1
- Height = 315
- Left = 825
- Style = 2 'Dropdown List
- TabIndex = 22
- Top = 360
- Width = 2310
- End
- Begin VB.Label Label2
- Caption = "Name:"
- Height = 315
- Left = 180
- TabIndex = 23
- Top = 420
- Width = 675
- End
- End
- Begin VB.Frame Frame5
- Caption = "Horizontal scale"
- Height = 960
- Left = -74820
- TabIndex = 15
- Top = 480
- Width = 5520
- Begin VB.CheckBox Check3
- Caption = "Grid"
- Height = 195
- Left = 1440
- TabIndex = 19
- Top = 420
- Width = 870
- End
- Begin VB.CheckBox Check1
- Caption = "Enabled"
- Height = 195
- Left = 120
- TabIndex = 18
- Top = 420
- Width = 1155
- End
- Begin VB.OptionButton Option3
- Caption = "Samples"
- Height = 195
- Index = 0
- Left = 2580
- TabIndex = 17
- Top = 420
- Width = 1035
- End
- Begin VB.OptionButton Option3
- Caption = "Millisecond"
- Height = 195
- Index = 1
- Left = 3900
- TabIndex = 16
- Top = 420
- Width = 1215
- End
- End
- Begin VB.Frame Frame4
- Caption = "Vertical scale"
- Height = 960
- Left = -74820
- TabIndex = 10
- Top = 1560
- Width = 5535
- Begin VB.CheckBox Check2
- Caption = "Enabled"
- Height = 195
- Left = 120
- TabIndex = 14
- Top = 360
- Width = 1125
- End
- Begin VB.CheckBox Check4
- Caption = "Grid"
- Height = 195
- Left = 1440
- TabIndex = 13
- Top = 360
- Width = 870
- End
- Begin VB.OptionButton Option4
- Caption = "Samples"
- Height = 195
- Index = 0
- Left = 2580
- TabIndex = 12
- Top = 360
- Width = 1275
- End
- Begin VB.OptionButton Option4
- Caption = "DB Value"
- Height = 195
- Index = 1
- Left = 3960
- TabIndex = 11
- Top = 360
- Width = 1275
- End
- End
- Begin VB.Label Label4
- Caption = "Temporaly Directory:"
- Height = 300
- Left = -74700
- TabIndex = 32
- Top = 675
- Width = 1665
- End
- Begin VB.Label Label3
- Caption = "Free space (Kb):"
- Height = 285
- Left = -74700
- TabIndex = 31
- Top = 1140
- Width = 1545
- End
- End
- Begin VB.PictureBox picOptions
- BorderStyle = 0 'None
- Height = 3780
- Index = 3
- Left = -20000
- ScaleHeight = 3780
- ScaleWidth = 5685
- TabIndex = 5
- TabStop = 0 'False
- Top = 480
- Width = 5685
- Begin VB.Frame fraSample4
- Caption = "Sample 4"
- Height = 1785
- Left = 2100
- TabIndex = 8
- Top = 840
- Width = 2055
- End
- End
- Begin VB.PictureBox picOptions
- BorderStyle = 0 'None
- Height = 3780
- Index = 2
- Left = -20000
- ScaleHeight = 3780
- ScaleWidth = 5685
- TabIndex = 4
- TabStop = 0 'False
- Top = 480
- Width = 5685
- Begin VB.Frame fraSample3
- Caption = "Sample 3"
- Height = 1785
- Left = 1545
- TabIndex = 7
- Top = 675
- Width = 2055
- End
- End
- Begin VB.PictureBox picOptions
- BorderStyle = 0 'None
- Height = 3780
- Index = 1
- Left = -20000
- ScaleHeight = 3780
- ScaleWidth = 5685
- TabIndex = 3
- TabStop = 0 'False
- Top = 480
- Width = 5685
- Begin VB.Frame fraSample2
- Caption = "Sample 2"
- Height = 1785
- Left = 645
- TabIndex = 6
- Top = 300
- Width = 2055
- End
- End
- Begin VB.CommandButton cmdApply
- Caption = "Apply"
- Height = 375
- Left = 4740
- TabIndex = 2
- Top = 3000
- Width = 1095
- End
- Begin VB.CommandButton cmdCancel
- Cancel = -1 'True
- Caption = "Cancel"
- Height = 375
- Left = 3480
- TabIndex = 1
- Top = 3000
- Width = 1095
- End
- Begin VB.CommandButton cmdOK
- Caption = "OK"
- Height = 375
- Left = 2280
- TabIndex = 0
- Top = 3000
- Width = 1095
- End
- Attribute VB_Name = "frmOptions"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Dim TypeVertical, TypeHorizontal
- Private Sub cmdApply_Click()
- frmDialog.NCTWavPlayer1.devInput = Combo1.ListIndex
- frmDialog.NCTWavPlayer1.devOutput = Combo2.ListIndex
- frmDialog.NCTWavPlayer1.flgSelectedPlay = Check6.Value
- frmDialog.NCTWavPlayer1.flgEndRecordBlock = Check7.Value
- SetParamView
- SetParametrColor
- End Sub
- Private Sub cmdCancel_Click()
- Unload Me
- End Sub
- Private Sub cmdColorChoice_Click()
- SelectColor
- End Sub
- Private Sub cmdOK_Click()
- frmDialog.NCTWavPlayer1.devInput = Combo1.ListIndex
- frmDialog.NCTWavPlayer1.devOutput = Combo2.ListIndex
- frmDialog.NCTWavPlayer1.flgSelectedPlay = Check6.Value
- frmDialog.NCTWavPlayer1.flgEndRecordBlock = Check7.Value
- SetParamView
- SetParametrColor
- Unload Me
- End Sub
- Private Sub Form_Load()
- Dim kDevInput, kDevOutput
- kDevInput = frmDialog.NCTWavPlayer1.devInput
- For i = 0 To frmDialog.NCTWavPlayer1.devInputMax
- frmDialog.NCTWavPlayer1.devInput = i
- Combo1.AddItem frmDialog.NCTWavPlayer1.devInputName
- Next
- frmDialog.NCTWavPlayer1.devInput = kDevInput
- Combo1.ListIndex = kDevInput
-
- kDevOutput = frmDialog.NCTWavPlayer1.devOutput
- For i = 0 To frmDialog.NCTWavPlayer1.devOutputMax
- frmDialog.NCTWavPlayer1.devOutput = i
- Combo2.AddItem frmDialog.NCTWavPlayer1.devOutputName
- Next
- frmDialog.NCTWavPlayer1.devOutput = kDevOutput
- Combo2.ListIndex = kDevOutput
- ' Scale settings
- If frmDialog.NCTWavPlayer1.VisibleBottomScale = True Then Check1.Value = 1 Else Check1.Value = 0
- If frmDialog.NCTWavPlayer1.VisibleRightScale = True Then Check2.Value = 1 Else Check2.Value = 0
- If frmDialog.NCTWavPlayer1.VisibleGridX = True Then Check3.Value = 1 Else Check3.Value = 0
- If frmDialog.NCTWavPlayer1.VisibleGridY = True Then Check4.Value = 1 Else Check4.Value = 0
- If frmDialog.NCTWavPlayer1.BottomScaleType = 1 Then
- Option3(0).Value = True
- Option3(1).Value = False
- End If
- If frmDialog.NCTWavPlayer1.BottomScaleType = 2 Then
- Option3(1).Value = True
- Option3(0).Value = False
- End If
- If frmDialog.NCTWavPlayer1.RightScaleType = 1 Then
- Option4(0).Value = True
- Option4(1).Value = False
- End If
- If frmDialog.NCTWavPlayer1.RightScaleType = 2 Then
- Option4(1).Value = True
- Option4(0).Value = False
- End If
- If (frmDialog.NCTWavPlayer1.flgSelectedPlay = True) Then
- Check6.Value = 1
- Else
- Check6.Value = 0
- End If
- If (frmDialog.NCTWavPlayer1.flgEndRecordBlock = True) Then
- Check7.Value = 1
- Else
- Check7.Value = 0
- End If
- ' Colors
- List1.ItemData(0) = frmDialog.NCTWavPlayer1.clrDigitalWaveform
- List1.ItemData(1) = frmDialog.NCTWavPlayer1.clrAnalogWaveform
- List1.ItemData(2) = frmDialog.NCTWavPlayer1.clrBackground
- List1.ItemData(3) = frmDialog.NCTWavPlayer1.clrCenterLine
- List1.ItemData(4) = frmDialog.NCTWavPlayer1.clrSelectedDigitalWaveform
- List1.ItemData(5) = frmDialog.NCTWavPlayer1.clrSelectedAnalogWaveform
- List1.ItemData(6) = frmDialog.NCTWavPlayer1.clrSelectedBackground
- List1.ItemData(7) = frmDialog.NCTWavPlayer1.clrSelectedCenterLine
- List1.ItemData(8) = frmDialog.NCTWavPlayer1.clrGrid
- List1.ItemData(9) = frmDialog.NCTWavPlayer1.clrCursor
- List1.ItemData(10) = frmDialog.NCTWavPlayer1.clrPlayCursor
- Text1.Text = frmDialog.NCTWavPlayer1.TempDirectory
- Text2.Text = frmDialog.NCTWavPlayer1.TotalAvailableFreeSpace
- End Sub
- Private Sub Check1_Click()
- If Check1.Value = 1 Then Check3.Enabled = True
- If Check1.Value = 0 Then Check3.Enabled = False
- End Sub
- Private Sub Check2_Click()
- If Check2.Value = 1 Then Check4.Enabled = True
- If Check2.Value = 0 Then Check4.Enabled = False
- End Sub
- Private Sub SetParamView()
- If Check1.Value = 1 Then frmDialog.NCTWavPlayer1.VisibleBottomScale = True
- If Check1.Value = 0 Then frmDialog.NCTWavPlayer1.VisibleBottomScale = False
- frmDialog.NCTWavPlayer1.BottomScaleType = TypeHorizontal
- frmDialog.NCTWavPlayer1.RightScaleType = TypeVertical
- If Check4.Value = 1 Then frmDialog.NCTWavPlayer1.VisibleGridY = True
- If Check4.Value = 0 Then frmDialog.NCTWavPlayer1.VisibleGridY = False
- If Check3.Value = 1 Then frmDialog.NCTWavPlayer1.VisibleGridX = True
- If Check3.Value = 0 Then frmDialog.NCTWavPlayer1.VisibleGridX = False
- If Check2.Value = 1 Then frmDialog.NCTWavPlayer1.VisibleRightScale = True
- If Check2.Value = 0 Then frmDialog.NCTWavPlayer1.VisibleRightScale = False
- End Sub
- Private Sub List1_Click()
- Color.BackColor = List1.ItemData(List1.ListIndex)
- End Sub
- Private Sub List1_DblClick()
- SelectColor
- End Sub
- Private Sub List1_ItemCheck(Item As Integer)
- Select Case Item
- Case 1:
- Color.BackColor = frmDialog.NCTWavPlayer1.ColorDigitalWaveform
- Case 2:
- Color.BackColor = 0
- End Select
- End Sub
- Private Sub Option3_Click(Index As Integer)
- TypeHorizontal = Index + 1
- End Sub
- Private Sub Option4_Click(Index As Integer)
- TypeVertical = Index + 1
- End Sub
- Private Sub SelectColor()
- Dim OldCol, NewCol As OLE_COLOR
- OldCol = List1.ItemData(List1.ListIndex)
- CommonDialog1.Color = OldCol
- CommonDialog1.DialogTitle = "Choice Color"
- CommonDialog1.Flags = cdlCCRGBInit Or cdlCCFullOpen
- CommonDialog1.ShowColor
- NewCol = CommonDialog1.Color
- List1.ItemData(List1.ListIndex) = NewCol
- Color.BackColor = List1.ItemData(List1.ListIndex)
- End Sub
- Private Sub SetParametrColor()
- frmDialog.NCTWavPlayer1.clrDigitalWaveform = List1.ItemData(0)
- frmDialog.NCTWavPlayer1.clrAnalogWaveform = List1.ItemData(1)
- frmDialog.NCTWavPlayer1.clrBackground = List1.ItemData(2)
- frmDialog.NCTWavPlayer1.clrCenterLine = List1.ItemData(3)
- frmDialog.NCTWavPlayer1.clrSelectedDigitalWaveform = List1.ItemData(4)
- frmDialog.NCTWavPlayer1.clrSelectedAnalogWaveform = List1.ItemData(5)
- frmDialog.NCTWavPlayer1.clrSelectedBackground = List1.ItemData(6)
- frmDialog.NCTWavPlayer1.clrSelectedCenterLine = List1.ItemData(7)
- frmDialog.NCTWavPlayer1.clrGrid = List1.ItemData(8)
- frmDialog.NCTWavPlayer1.clrCursor = List1.ItemData(9)
- frmDialog.NCTWavPlayer1.clrPlayCursor = List1.ItemData(10)
- End Sub
-